import mixin from '../utils/mixin';
import { Document, Block, Plugin, Schema, Style, Action } from '../model';

Document.prototype.__block__ = true;

class ModelInterface {
  static isBlock(model) {
    return !!model.__block__;
  }

  static isDocument(model) {
    return !!model.__document__;
  }

  static isPlugin(model) {
    return !!model.__plugin__;
  }

  static isAction(model) {
    return !!model.__action__;
  }

  static isStyle(model) {
    return !!model.__style__;
  }

  static isSchema(model) {
    return !!model.__schema__;
  }
}

mixin(ModelInterface, [Document, Block, Plugin, Schema, Style, Action]);
